package com.example.homeworkhelper.faq;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.homeworkhelper.R;


public class FaqViewHolder extends RecyclerView.ViewHolder {

    private FaqData faqData;
    private View contentView;
    private TextView ques;
    private TextView answer;

    public FaqViewHolder(@NonNull View itemView) {
        super(itemView);
        contentView = itemView;
        ques = contentView.findViewById(R.id.faq_ques);
        answer = contentView.findViewById(R.id.faq_answer);
    }

    public void onBind(int position, FaqData faqData) {
        ques.setText(faqData.getQues_desc());
        answer.setText(faqData.getAnswer());
    }
}
